import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: "/index"
  },
  {
    path: '/index',
    name: 'Index',
    component: () => import(/* webpackChunkName: "about" */ '../views/Index/index.vue'),
    children: [
      {
        path: '/index/home',
        name: 'Home',
        component: () => import(/* webpackChunkName: "about" */ '../views/Home/index.vue')
      },
      {
        path: '/index/class',
        name: 'Class',
        component: () => import(/* webpackChunkName: "about" */ '../views/Class/index.vue')
      }
    ]
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
